]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Track which barriers have been hit
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 29 Apr 2015 00:36:53 +0000 (17:36 -0700)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 29 Apr 2015 00:49:52 +0000 (17:49 -0700)
For barriers like the hot corner which are made up of multiple axis
barriers, make sure that all the barriers have been left before
resetting the barrier.

js/ui/layout.js

index 204665fa0aa861007a71d56ce2f5d8ce79d63568..d5780e523f15dfee32249bf1fe6c28a8e7af548b 100644 (file)
@@ -1316,8 +1316,11 @@ const PressureBarrier = new Lang.Class({
     },
 
     _onBarrierLeft: function(barrier, event) {
-        this._reset();
-        this._isTriggered = false;
+        barrier._isHit = false;
+        if (this._barriers.every(function(b) { return !b._isHit; })) {
+            this._reset();
+            this._isTriggered = false;
+        }
     },
 
     _trigger: function() {
@@ -1327,6 +1330,8 @@ const PressureBarrier = new Lang.Class({
     },
 
     _onBarrierHit: function(barrier, event) {
+        barrier._isHit = true;
+
         // If we've triggered the barrier, wait until the pointer has the
         // left the barrier hitbox until we trigger it again.
         if (this._isTriggered)